import java.awt.Color;


public class Location {
	private int row;
	private int column;
	private Grid gr;
	public Location (int column,int row, Grid gr){
		this.row=row;
		this.column=column;
		this.gr=gr;
		
	}
	public Location getLocationUnder(){
		return new Location (column,row+1,gr);
	}
	public int getRow(){
		return row;
	}
	
	public int getCol(){
		return column;
	}
	//returns the x coordinate of this location within the applet
	public int getXCoord(){
		return column*gr.getSize()+gr.getXCoord();
	}
	//returns the y coordinate of this location within the applet
	public int getYCoord(){
		return row*gr.getSize()+gr.getYCoord();
	}
	
	public String toString(){
		return "("+column+","+row+")";
	}
	public Block get(){
		return new Block(Color.PINK,gr,this);
		
	}
}
